function ydot=testrdforce(t,y,R,sig)

load('orthbase');

ydot(1) =R(t)-1/2*sig(t).^2;
ydot(2) =sig(t).*ms{2}(t);
ydot(3) =0;
ydot(4) =sig(t).*ms{1}(t);
ydot(5) =sig(t).*(ms{1}(t)+ms{2}(t));
ydot(6) =sig(t).*ms{1}(t);
ydot(7) =0;
ydot(8) =sig(t).*ms{2}(t);
ydot(9) =0;
ydot(10)=0;
ydot(11)=sig(t).*ms{2}(t);
ydot(12)=0;

ydot=ydot';
% indexJ(2,4,[4,2])
%      0     0
%      0     1
%      0     2
%      1     0
%      1     1
%      1     2
%      2     0
%      2     1
%      2     2
%      3     0
%      3     1
%      4     0